package com.ruoyi.question.service.impl;

import com.ruoyi.question.domain.DtAnswerRecord;
import com.ruoyi.question.mapper.DtAnswerRecordMapper;
import com.ruoyi.question.service.IDtAnswerRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 答题记录管理Service业务层处理
 *
 * @author llc
 * @date 2025-01-06
 */
@Service
public class DtAnswerRecordServiceImpl implements IDtAnswerRecordService {
    @Autowired
    private DtAnswerRecordMapper dtAnswerRecordMapper;

    /**
     * 查询答题记录管理
     *
     * @param id 答题记录管理主键
     * @return 答题记录管理
     */
    @Override
    public DtAnswerRecord selectDtAnswerRecordById(Long id) {
        return dtAnswerRecordMapper.selectDtAnswerRecordById(id);
    }

    /**
     * 查询答题记录管理列表
     *
     * @param dtAnswerRecord 答题记录管理
     * @return 答题记录管理
     */
    @Override
    public List<DtAnswerRecord> selectDtAnswerRecordList(DtAnswerRecord dtAnswerRecord) {
        return dtAnswerRecordMapper.selectDtAnswerRecordList(dtAnswerRecord);
    }

    /**
     * 新增答题记录管理
     *
     * @param dtAnswerRecord 答题记录管理
     * @return 结果
     */
    @Override
    public int insertDtAnswerRecord(DtAnswerRecord dtAnswerRecord) {
        return dtAnswerRecordMapper.insertDtAnswerRecord(dtAnswerRecord);
    }

    /**
     * 修改答题记录管理
     *
     * @param dtAnswerRecord 答题记录管理
     * @return 结果
     */
    @Override
    public int updateDtAnswerRecord(DtAnswerRecord dtAnswerRecord) {
        return dtAnswerRecordMapper.updateDtAnswerRecord(dtAnswerRecord);
    }

    /**
     * 批量删除答题记录管理
     *
     * @param ids 需要删除的答题记录管理主键
     * @return 结果
     */
    @Override
    public int deleteDtAnswerRecordByIds(Long[] ids) {
        return dtAnswerRecordMapper.deleteDtAnswerRecordByIds(ids);
    }

    /**
     * 删除答题记录管理信息
     *
     * @param id 答题记录管理主键
     * @return 结果
     */
    @Override
    public int deleteDtAnswerRecordById(Long id) {
        return dtAnswerRecordMapper.deleteDtAnswerRecordById(id);
    }
}
